import axios from '@/api/axios'
import fileDownload from "js-file-download";

export const download = (url, params, filename, callback) => {
    axios({
        method: 'post',
        url: url,
        data: params,
        responseType: 'blob'
    }).then((res) => {
        fileDownload(res.data, filename, 'application/vnd.ms-excel')
        if (callback) callback();
    })
}

